#include <memory>
#include "TcpServer.hpp"
#include "Command.hpp"

int main(int argc, char *argv[])
{
    EnableConsoleLogStrategy(); // 启动日志
    Command cmd;
    std::unique_ptr<TcpServer> tsvr = std::make_unique<TcpServer>((uint16_t)std::stoi(argv[1]), [&cmd](const std::string &str) {
        return cmd.Exec(str);
    });
    tsvr->Init();
    tsvr->Start();
    return 0;
}